<template>
  <view>
    <view
      @click="goDetail(item)"
      :key="index"
      v-for="(item, index) in list"
      class="lisBox"
    >
      <view class="lis">
        <view class="li_wrap">
          <view class="tit">
            {{ item.title }}
          </view>
		 
		 <view class="li_wrap">
		   <view
		     v-if="item.monthly_salary_min || item.monthly_salary_max"
		     class="month"
		   >
		     {{ item.monthly_salary_min }}
		     {{
		       item.monthly_salary_max == null
		         ? "元/月"
		         : "~" + item.monthly_salary_max + "元/月"
		     }}
			 {{item.royalty =='true'?'+提成':''}}
		   </view>
		   
		   <view v-else class="month"> 薪资面议{{item.royalty =='true'?'+提成':''}}</view>
		   <!-- <view class="day">
		     {{ item.wages }}
		   </view> -->
		   <!-- <view class="">福利:{{item.benefits}}</view> -->
		 </view>
		 
          <!-- <image
            class="smallicon"
            src="https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/home/gongjia.png"
            mode="widthFix"
          ></image> -->
		  
		  

          <div></div>
        </view>
		<!-- <view class="">{{job.workExperience}} | 招聘{{job.needNum}}人 | {{item.city}}-{{item.district}}</view>
		<view class="">{{job.benefits}}</view> -->
		<!-- 薪资 -->
		
		<view class="flView">岗位福利:
				
		<u-tag  class="li" :text="item.benefits=='' || item.benefits==null?'无':item.benefits" plain
			 type="primary" style="padding: 2px; font-size: 26rpx;"></u-tag>
		</view>
		
       
        <view v-if="item.labels" class="li_wrap">
          <view class="tags">
            <view
              :key="index"
              v-for="(label, index) in item.labels.split(',')"
              class="tagli"
            >
              {{ label }}
            </view>
          </view>
        </view>
        <view class="li_wrap">
          <!-- <view>
            <u-icon class="map" name="map-fill" color="#2878FF"></u-icon>
            <text class="ssq"
              >{{ item.province }}{{ item.city }}{{ item.district }}
            </text>
          </view>
		  -->
		  <view v-if="item.work_state=='已招满'" class="ssq">
		  	{{ item.work_state }}
		  </view>
        </view>
      </view>
	  <!-- 公司名称 -->
      <view class="bots" v-if="item.name">
        <view class="company">
			<!--enterpriseCertification 如果在认证添加了公司logo就使用公司提供的logo，如果没有显示固定图片 -->
          <view class="logo">
            <!-- <image
              v-if="item.logo_url"
              class="img"
              :src="item.logo_url"
              mode="widthFix"
            ></image> -->
			
            <image
             
              class="img"
			   src='https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/lg/qy2.png' 
              
              mode="widthFix"
            ></image>
          </view>
		  <!-- 地址 -->
          <view class="companyName">
            {{ item.name ? item.name : "" }}
          </view>
		  
        </view>
       <!-- 发布日期 -->
        <!-- <view class="time"> {{ item.add_time ? item.add_time.split(' ')[0] : "" }}</view> -->
      </view>
	  <!-- 公司地址 -->
	  <view class="bots">
	    <view class="company">
	  			<!--enterpriseCertification 如果在认证添加了公司logo就使用公司提供的logo，如果没有显示固定图片 -->
	      <view class="logo">
	        <image
	          class="img"
	  			   src='https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/lg/mapLogo.png' 
	          mode="widthFix"
	        ></image>
	      </view>
	  		  <!-- 地址 -->
	      <view class="companyName">
	  			  {{item.province}}{{item.city}}{{item.district}}
	      </view>
	  		  
	    </view>
	   <!-- 发布日期 -->
	    <view class="time"> {{ item.add_time ? item.add_time.split(' ')[0] : "" }}</view> 
	  </view>
     
    </view>
  </view>
</template>

<script>
	import Bus from '../../utils/bus.js'
export default {
	
  props: ["list", "gowhere"],   //接收父组件comSearch传的值
  data() {
    return {
		type12:'',
		
		
		
	};
  },
  onLoad() {
  // 	Bus.$on('val',(job)=>{
  // 			// A页面传过来的数据
		// 	this.job=job
  // 			console.log(job,'接收数据')
  // 		})
  },
  methods: {
    goDetail(item) {
      if (item.simple == 0) {
        uni.navigateTo({
          url: "/package/pages/searchJob/list/simpledetail?jobId=" + item.id+"&simple="+item.simple,
        });
      } else {
        uni.navigateTo({
          url: "/package/pages/searchJob/list/detail?jobId=" + item.id,
        });
      }
    },
	
  },
};
</script>

<style lang="scss" scoped>
	.flView{
		line-height: 70rpx;
	}
.ssq {
  font-size: 14px;
  color: #999;
  text-align: right;
  width: 100%;
}
.lisBox {
  background: #ffffff;
  border-radius: 10rpx;
  margin-bottom: 20rpx;
}

.lis {
  padding: 32rpx 32rpx 10rpx;
  border-bottom: 1px solid #f7f8fa;
  &:last-child {
    margin-bottom: 0;
  }

  .li_wrap {
    // margin-bottom: 20rpx;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    .smallicon {
      display: blocrk;
      width: 40rpx;
      height: 40rpx;
    }
    .tit {
      flex: 1;
      margin-right: 20rpx;
      font-size: 18px;
      font-weight: bold;
      color: #333333;
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .day {
      font-size: 16px;
      font-weight: bold;
      color: $my-wz;
      text-align: right;
    }

    .month {
      font-weight: bold;
      font-size: 14px;
      color:#F75E54;
      text-align: right;
    }
  }

  .tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    .tagli {
      font-size: 12px;
      background:#ECF5FF;
      margin-right: 20rpx;
      padding: 1px 5px;
      color: #5B81B8;
      border-radius: 2px;
      margin-bottom: 10px;
    }
  }
}

.bots {
  display: flex;
  align-items: center;
  padding: 12rpx 32rpx;
    justify-content: space-between;
  .company{
    display: flex;
    align-items: center;
  
    flex: 1;
  }
  .time{
    width: 120px;
    text-align:right;
    font-size: 28rpx;
    color: #5B81B8;
  }

  .img {
    display: block;
    width: 50rpx;
    height: 50rpx;
    margin-right: 10rpx;
    border-radius: 3px;
  }

  .companyName {
    font-size: 30rpx;
    color: #333333;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
  }
}
</style>
